#coding:utf-8
import os,stat
import platform
import play_win

class dict_play:
        def __init__(self,parent):
                if platform.system()=="Linux":
                        import wx
                        import wx.media                        
                        self.mc = wx.media.MediaCtrl(parent,pos=wx.Point(-100,-100))
        def read(self,filename):
                if platform.system()=="Linux":
                        self.mc.Load(filename)
                        self.mc.Play()
                        return
                elif platform.system()=="Windows":
                        play_win.playmp3(filename)